<?php 
$Content = QContext::instance();
$base_url = $Content->requestUDI();
$search = $base_url;
$search['action'] = 'search';
$export = $base_url;
$export['action'] = 'export';

?>
<form id="pagerForm" method="get" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>">
		<input type="hidden" name="pageNum" value="<?php echo $pagination['current'];?>" /> <!--【必须】value=1可以写死-->
		<input type="hidden" name="numPerPage" value="<?php echo $pagination['page_size'];?>" /> <!--【可选】每页显示多少条-->
		<input type="hidden" name="orderField" value="<?php echo $orderField;?>" />
		<input type="hidden" name="orderDirection" value="<?php echo $orderDirection;?>" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>" method="get">
	<div class="searchBar">
		<table class="searchContent">
		<tbody>
			<tr>
				<td><label>代理：</label>
				<select name="agent_id">
				<option value="">请选择代理....</option>
				<?php foreach ($agent_list as $k=>$v):?>
				<option value="<?php echo $k;?>" <?php echo isset($param['agent_id'])?$param['agent_id'] == $k?'selected':'':''; ?>><?php echo $v;?></option>
				<?php endforeach;?>
				</select>
				<td>
			<td>
				
				<select class="combox" name="_yeah">
				<option value="2012">今年</option>
				<option value="2013" <?php echo isset($_SESSION['cdr_yeah'])?$_SESSION['cdr_yeah']=='2013'?'selected':'':'';?>>2013年</option>	
			</select></td>
			<td>
				
				<select  name="_month">
				<?php for ($i=1;$i<=12;$i++):?>
				<option value="<?php echo sprintf('%02d',$i);?>" <?php echo isset($_SESSION['cdr_month'])?intval($_SESSION['cdr_month']) == intval($i) ?'selected':'':'';?>><?php echo sprintf('%02d',$i);?>月</option>			
				<?php endfor;?>
			</select></td>
			<td>
				<input type="text" name="begin_day" value="<?php echo isset($param['begin_day'])?$param['begin_day']:date('d',time());?>">日 至<input type="text" name="end_day" value="<?php echo isset($param['end_day'])?$param['end_day']:date('d',time());?>" />
			</td>
			</tr>
			<tr>
			
		</tr></tbody></table>
		
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			
			
			<li class="line">line</li>
			
		</ul>
	</div>
	<table class="table" width="1200" layoutH="158">
		<thead>
			<tr>
				
				<th width="5%" orderField="agent_id" >代理商</th>
				<th width="5%" >帐号</th>
				<th width="5%" >当前余额</th>
				<th width="3%" >消费日期</th>
				<th width="5%" align="center" >时长 	</th>
				<th width="5%" >消费金额(元)</th>
				
			</tr>
		</thead>
		<tbody>
		
			<?php foreach ($result as $k=>$v):?>
		
			<tr target="id" >
				
				<td><?php echo $v['acctname']?></td>
				<td><?php echo $v['user_acctname']?></td>
				<td><?php echo sprintf('%f',$v['balance'])?> </td>
				<td><?php echo $v['datetime']?></td>
				<td><?php echo $v['sum_billsec']?></td>
				<td><?php echo $v['sum_costuser']?></td>
				
				
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	
</div>